package com.xm.myapplication.MVP.A.Presenter;


import android.content.Context;

import com.xm.httpapi.BaseView.BasePresenter;
import com.xm.myapplication.MVP.A.IDemo;
import com.xm.myapplication.MVP.A.Model.LoginResult;
import com.xm.myapplication.MVP.A.Model.Model;
import com.xm.myapplication.MVP.A.Model.PwdLoginRequest;
import com.xm.myapplication.MVP.A.View.HomeMVPFragment;

import java.util.List;
import java.util.Map;


public class FragmentPresenter extends BasePresenter<HomeMVPFragment, Model> implements IDemo.IPresenter {

    @Override
    public void load(PwdLoginRequest pwdLoginRequest,Context context) {
        model.getData(pwdLoginRequest,request(data -> getView().setData((LoginResult)data), err -> getView().error(err),context,true));
    }

    @Override
    protected Map<String, List<String>> getMap() {
        return null;
    }

    @Override
    public void load(PwdLoginRequest pwdLoginRequest) {

    }
}

